<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../org/angular.min.js"></script>
</head>
<body ng-app="hd">
<div ng-controller="ctrl">
    商品：<input type="text" ng-model="goods.title"><br>
    价格：<input type="text" ng-model="goods.price" readonly="readonly"><br>
    数量：<input type="text" ng-model="goods.num"><br>
    总计：<input type="text" ng-value="goods.price*goods.num">
</div>


<script>
    var m = angular.module('hd', []);
    m.controller('ctrl', ['$scope', function ($scope) {
        $scope.goods = {'title': 'apple mac', 'price': 54, 'num': 0};
    }]);

</script>
</body>
</html>